package stud.mpgame.network.service.ping;

import flash.utils.IDataInput;
import flash.utils.IDataOutput;
import stud.mpgame.network.Message;
import stud.mpgame.network.UserObject;

/**
 * ...
 * @author Timofeev
 */

class PingNotificationUserObject extends UserObject {
    
    private var ping:Int;    
    
    public function new(ping:Int) {
        super();
        this.ping = ping;
    }
    
    public function getPing():Int {
        return ping;
    }
    
    public override function readExternal(input:IDataInput, message:Message):Void {
        this.ping = input.readInt();
    }
    
    public override function writeExternal(output:IDataOutput, message:Message):Void {
        output.writeInt(ping);
    }
    
}